{extend name="public:base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-header">上传设置</div>
    <div class="layui-card-body">
        <form action="{:url('admin/config/upload')}" class="layui-form" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">图片压缩</label>
                <div class="layui-input-block">
                    <input type="hidden" name="is_thumb" value="0">
                    <input type="checkbox" name="is_thumb" value="1" lay-skin="switch" lay-text="开启|关闭" {if isset($data.is_thumb) and $data.is_thumb eq '1'}checked="checked"{/if}>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">最大宽度</label>
                <div class="layui-input-inline">
                    <input type="text" name="max_width" value="{$data.max_width|default=''}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">px</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">最大高度</label>
                <div class="layui-input-inline">
                    <input type="text" name="max_height" value="{$data.max_height|default=''}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">px</div>
            </div>
            <hr>
            <div class="layui-form-item">
                <label class="layui-form-label">水印图片</label>
                <div class="layui-input-block">
                    <input type="hidden" name="is_water" value="0">
                    <input type="checkbox" name="is_water" value="1" lay-skin="switch" lay-text="开启|关闭" {if isset($data.is_water) and $data.is_water eq '1'}checked="checked"{/if}>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">上传水印</label>
                <div class="layui-input-inline" style="width: 300px">
                    <input type="text" name="water_source" value="{$data.water_source|default=''}" autocomplete="off" placeholder="请上传图片" class="layui-input">
                    <button type="button" class="layui-btn layui-btn-primary layui-btn-position ajax-file"><i class="fa fa-file-image-o"></i> 选择图片</button>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">水印位置</label>
                <div class="layui-input-inline">
                    <select name="water_locate">
                        <option value="1" {if isset($data.water_locate) and $data.water_locate eq '1'}selected{/if}>左上角</option>
                        <option value="2" {if isset($data.water_locate) and $data.water_locate eq '2'}selected{/if}>上居中</option>
                        <option value="3" {if isset($data.water_locate) and $data.water_locate eq '3'}selected{/if}>右上角</option>
                        <option value="4" {if isset($data.water_locate) and $data.water_locate eq '4'}selected{/if}>左居中</option>
                        <option value="5" {if isset($data.water_locate) and $data.water_locate eq '5'}selected{/if}>居中</option>
                        <option value="6" {if isset($data.water_locate) and $data.water_locate eq '6'}selected{/if}>右居中</option>
                        <option value="7" {if isset($data.water_locate) and $data.water_locate eq '7'}selected{/if}>左下角</option>
                        <option value="8" {if isset($data.water_locate) and $data.water_locate eq '8'}selected{/if}>下居中</option>
                        <option value="9" {if isset($data.water_locate) and $data.water_locate eq '9'}selected{/if}>右下角</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">水印透明度</label>
                <div class="layui-input-inline">
                    <input type="text" name="water_alpha" value="{$data.water_alpha|default=''}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">可设置值为0~100，数字越小，透明度越高</div>
            </div>
            <hr>
            <div class="layui-form-item">
                <label class="layui-form-label">文本水印</label>
                <div class="layui-input-block">
                    <input type="hidden" name="is_text" value="0">
                    <input type="checkbox" name="is_text" value="1" lay-skin="switch" lay-text="开启|关闭" {if isset($data.is_text) and $data.is_text eq '1'}checked="checked"{/if}>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">文本内容</label>
                <div class="layui-input-inline">
                    <input type="text" name="text" value="{$data.text|default=''}" autocomplete="off" placeholder="请输入文本内容" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">上传字体</label>
                <div class="layui-input-inline" style="width: 300px">
                    <input type="text" name="text_font" value="{$data.text_font|default=''}" autocomplete="off" placeholder="请上传字体" class="layui-input">
                    <button type="button" class="layui-btn layui-btn-primary layui-btn-position ajax-file"><i class="fa fa-file-o"></i> 选择文件</button>
                </div>
                <div class="layui-form-mid layui-word-aux">默认使用系统字体</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">水印位置</label>
                <div class="layui-input-inline">
                    <select name="text_locate">
                        <option value="1" {if isset($data.text_locate) and $data.text_locate eq '1'}selected{/if}>左上角</option>
                        <option value="2" {if isset($data.text_locate) and $data.text_locate eq '2'}selected{/if}>上居中</option>
                        <option value="3" {if isset($data.text_locate) and $data.text_locate eq '3'}selected{/if}>右上角</option>
                        <option value="4" {if isset($data.text_locate) and $data.text_locate eq '4'}selected{/if}>左居中</option>
                        <option value="5" {if isset($data.text_locate) and $data.text_locate eq '5'}selected{/if}>居中</option>
                        <option value="6" {if isset($data.text_locate) and $data.text_locate eq '6'}selected{/if}>右居中</option>
                        <option value="7" {if isset($data.text_locate) and $data.text_locate eq '7'}selected{/if}>左下角</option>
                        <option value="8" {if isset($data.text_locate) and $data.text_locate eq '8'}selected{/if}>下居中</option>
                        <option value="9" {if isset($data.text_locate) and $data.text_locate eq '9'}selected{/if}>右下角</option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">字体大小</label>
                <div class="layui-input-inline">
                    <input type="text" name="text_size" value="{$data.text_size|default=''}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">px</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">字体颜色</label>
                <div class="layui-input-inline">
                    <input type="text" name="text_color" value="{$data.text_color|default=''}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">格式：#000000</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">偏移量</label>
                <div class="layui-input-inline">
                    <input type="text" name="text_offset" value="{$data.text_offset|default=''}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">文字相对当前位置的偏移量</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">倾斜角度</label>
                <div class="layui-input-inline">
                    <input type="text" name="text_angle" value="{$data.text_angle|default=''}" autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">文字相对当前位置的倾斜角度</div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="*" lay-submit="">保存</button>
                    <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
